package leetcodecompetition.S105;

import java.util.Arrays;

/**
 * @Author: Siantar
 * @Date: 2023-05-27-22:31
 * @Description: 1.0
 */
public class T6395 {
    public int buyChoco(int[] prices, int money) {
        Arrays.sort(prices);
        int res = money - prices[0] - prices[1];
        return res >= 0 ? res:money;
    }
}
